Skip to content

Refresh signed-commits kata: SSH signing, per-OS setup, exercise - #395

Merged
JKrag merged 2 commits into
masterfrom
refresh-signed-commits
Oct 16, 2026
Merged

JKrag merged 2 commits into
masterfrom
refresh-signed-commits

Conversation

@JKrag

@JKrag JKrag commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rework the signed-commits guide so it works on Windows, macOS and Linux (previously Windows/Gpg4win only).
  • Add SSH signing (Git ≥ 2.34) as the recommended, simpler path; keep GPG as an alternative.
  • GPG section: per-OS install and clipboard commands, ed25519 default, GPG_TTY / pinentry-mac gotchas, corrected gpg-agent.conf paths plus agent restart, Windows gpg.program fix.
  • Add a short hands-on exercise, a troubleshooting table, and a warning about --global config.
  • Replace the missing git-log-show-signature.png (never committed) with a text example; fix typos and headings.
  • List the kata in Overview.md.

Testing

  • Ran the GPG flow (ed25519 key, --keyid-format LONG, signing config, commit, --show-signature) and the SSH flow (gpg.format ssh, allowedSignersFile) on macOS: both give "Good signature".
  • Not tested: Windows and Linux steps, pinentry-mac setup, and the GitHub-side steps (Signing Key type, Verified/Unverified badges). Reviewers on Windows please check the Git Bash gpg.program line and the %APPDATA%\gnupg path.

Tradeoffs

  • SSH is now the recommended default; swap the order of the options if you prefer to teach GPG first.
  • The exercise section is new and can be trimmed if the kata should stay guide-only.

🤖 Generated with Claude Code

…troubleshooting

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@JKrag
JKrag force-pushed the refresh-signed-commits branch from a2ebf50 to bdeee6a Compare October 16, 2026 11:20
@JKrag
JKrag requested a balanced review from Copilot October 16, 2026 11:27
@JKrag
JKrag requested a review from moller2866 October 16, 2026 11:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SSH-agent setup, GPG format selection, and exercise commands need corrections to prevent signing and commit failures.

3 open findings
What changed in this PR

Updates the signed-commits kata from a Windows-focused GPG guide to cross-platform SSH and GPG instructions.

Changes:

  • Recommends SSH signing and expands per-OS GPG setup.
  • Adds a hands-on exercise, verification examples, and troubleshooting.
  • Lists the kata in the overview.
File Description
signed-commits/​README.md Expands signing setup, exercises, and verification guidance.
Overview.md Adds the signed-commits kata link.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread signed-commits/README.md Outdated
Comment on lines +69 to +70
If your key has a passphrase, load it into `ssh-agent` so you are not asked on every commit (`ssh-add ~/.ssh/id_ed25519_signing`).
On macOS, `ssh-add --apple-use-keychain` stores it in the keychain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the SSH setup to require loading the matching private key into a running ssh-agent before signing, regardless of passphrase, and included the custom key filename in the macOS command. Commit: 216e0fe.

Comment thread signed-commits/README.md Resolved
Comment thread signed-commits/README.md Outdated
Comment on lines +214 to +218
2. Make a commit **with** signing: `git commit -S -m "signed"` (if you set `commit.gpgsign true` globally, plain `git commit` is enough).
3. Compare the two with `git log --show-signature` (see below). Which one has a signature?
4. Create a repository on GitHub, push both commits, and look at the commit list in the web UI.
The signed commit has a green **Verified** badge, the unsigned one has none.
5. Try the usual failure: set `git config user.email someone-else@example.com`, make another signed commit and push.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added --allow-empty to the signed commit instructions in steps 2 and 5, including the automatic-signing alternatives. Commit: 216e0fe.

Co-authored-by: JKrag <1712950+JKrag@users.noreply.github.com>

@moller2866 moller2866 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JKrag
JKrag merged commit 40af632 into master Oct 16, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants